home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / prog / tge131.arj / TGEMOUSE.H < prev    next >
C/C++ Source or Header  |  1994-03-05  |  5KB  |  114 lines

  1. /*****************************************************************************
  2. *       The Graphics Engine version 1.31                                     *
  3. *                                                                            *
  4. *       The Graphics Engine code and documentation are                       *
  5. *       Copyright (c) 1993-1994 by Matthew Hildebrand; all rights reserved.  *
  6. *                                                                            *
  7. *       Unauthorised usage or modification of any or all of The Graphics     *
  8. *       Engine is strictly prohibited.                                       *
  9. *****************************************************************************/
  10.  
  11. #if !defined(TGEMOUSEdotH)
  12. #define TGEMOUSEdotH
  13.  
  14.  
  15. /* Note that this C/C++ bit might not work properly with your compiler.  If
  16.    you are using C++ and your linker reports that these functions are not
  17.    found, try explicitly forcing the extern "C" syntax by removing these
  18.    preprocessor directives. */
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24. void far TGE_initNewMouse(void huge (*drawPointer)(int x, int y, void far *image),
  25.           void huge (*drawBitmap)(int x, int y, void far *image),
  26.           void huge (*getBitmap)(int ulx, int uly, int lrx, int lry,
  27.               void far *image));
  28. void TGE_deInitNewMouse(void);
  29. void TGE_disableNewMouse(void);
  30. void TGE_enableNewMouse(void);
  31.  
  32. void TGE_setupMousePointer(int pointerNum);
  33. void TGE_setPointerColours(void);
  34.  
  35. int far TGE_resetMouse(void);
  36. int far TGE_getButtonsMouse(void);
  37. void far TGE_showMouse(void);
  38. void far TGE_hideMouse(void);
  39. void far TGE_getPosMouse(int far *x, int far *y);
  40. void far TGE_setPosMouse(unsigned x, unsigned y);
  41. int far TGE_buttonMouse(void);
  42. int far TGE_leftButtonMouse(void);
  43. int far TGE_rightButtonMouse(void);
  44. int far TGE_centerButtonMouse(void);
  45. unsigned far TGE_buttonPressMouse(unsigned button, int far *x, int far *y);
  46. unsigned far TGE_buttonReleaseMouse(unsigned button, int far *x, int far *y);
  47. void far TGE_setHorizLimitsMouse(unsigned min, unsigned max);
  48. void far TGE_setVertLimitsMouse(unsigned min, unsigned max);
  49. void far TGE_setPointerMouse(int xoff, int yoff, void far *p);
  50. unsigned far TGE_getSaveSizeMouse(void);
  51. void far TGE_saveStateMouse(void far *buf);
  52. void far TGE_restoreStateMouse(void far *buf);
  53. void far TGE_softResetMouse(void);
  54. void far TGE_waitReleaseMouse(int button);
  55. void far TGE_setRatioMouse(int horiz, int vert);
  56. void far TGE_getSensitivityMouse(int *horiz, int *vert, int *doubleSpeed);
  57.  
  58. #ifdef __cplusplus
  59. };
  60. #endif
  61.  
  62.  
  63. /* The function names of TGE's mouse functions are defined here.  Since they
  64.    are really just macros pretending to be functions, you can easily
  65.    change their names here if you don't like the default ones. */
  66.  
  67. #define initNewMouse()            TGE_initNewMouse(putImageInv, \
  68.                         putImage, getImage)
  69. #define deInitNewMouse                 TGE_deInitNewMouse
  70. #define disableNewMouse            TGE_disableNewMouse
  71. #define enableNewMouse            TGE_enableNewMouse
  72.  
  73. #define setupMousePointer(num)         TGE_setupMousePointer(num)
  74. #define setPointerColours        TGE_setPointerColours
  75.  
  76. #define resetMouse            TGE_resetMouse
  77. #define getButtonsMouse            TGE_getButtonsMouse
  78. #define showMouse            TGE_showMouse
  79. #define hideMouse            TGE_hideMouse
  80. #define getPosMouse(x,y)        TGE_getPosMouse(x,y)
  81. #define setPosMouse(x,y)        TGE_setPosMouse(x,y)
  82. #define buttonMouse            TGE_buttonMouse
  83. #define leftButtonMouse            TGE_leftButtonMouse
  84. #define rightButtonMouse               TGE_rightButtonMouse
  85. #define centerButtonMouse        TGE_centerButtonMouse
  86. #define buttonPressMouse(button,x,y)    TGE_buttonPressMouse(button,x,y)
  87. #define buttonReleaseMouse(button,x,y)    TGE_buttonReleaseMouse(button,x,y)
  88. #define setHorizLimitsMouse(min,max)    TGE_setHorizLimitsMouse(min,max)
  89. #define setVertLimitsMouse(min,max)    TGE_setVertLimitsMouse(min,max)
  90. #define setPointerMouse(xOff,yOff,p)    TGE_setPointerMouse(xOff,yOff,p)
  91. #define getSaveSizeMouse        TGE_getSaveSizeMouse
  92. #define saveStateMouse(buf)        TGE_saveStateMouse(buf)
  93. #define restoreStateMouse(buf)        TGE_restoreStateMouse(buf)
  94. #define softResetMouse            TGE_softResetMouse
  95. #define waitReleaseMouse(button)    TGE_waitReleaseMouse(button)
  96. #define setRatioMouse(horiz,vert)    TGE_setRatioMouse(horiz,vert)
  97. #define getSensitivityMouse(h,v,d)    TGE_getSensitivityMouse(h,v,d)
  98.  
  99.  
  100. /* These macros are used by the mouse routines */
  101.  
  102. #define    LEFTBUTTON    1
  103. #define RIGHTBUTTON    2
  104. #define    CENTERBUTTON    3
  105.  
  106. #define    ARROW_POINTER        1
  107. #define TARGET_POINTER        2
  108. #define BIG_ARROW_POINTER    3
  109. #define BIG_TARGET_POINTER    4
  110.  
  111.  
  112.  
  113. #endif
  114.